<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<body>
<?php
$this->load->helper('url');
if ($userid!=''){
echo form_open('member/update');
echo form_label($userid);
echo "<br>";
}else{
echo form_open('member/add');
}
echo form_label('姓名','name');
echo "<br>";
$ndata = array('name' => 'uname', 'id' => 'uname', 'size' => '20');
echo form_input($ndata);
echo "<br>";
echo form_label('密码','upass');
echo "<br>";
$adata = array('name' => 'upass', 'id' => 'upass', 'type' => 'password', 'size' => '20');
echo form_input($adata);
echo "<br>";
echo form_label('类型1');
echo form_radio('utype',0,true);
echo form_label('类型2');
echo form_radio('utype',1);
echo form_label('类型3');
echo form_radio('utype',2);
echo form_hidden('userid',$userid);
if ($userid!=''){
echo form_submit('submit','修改');
}else{
echo form_submit('submit','新增');
}
echo form_close();
echo validation_errors();
echo "<table border=1>
<tr>
<td>userid</td>
<td>username</td>
<td>password</td>
<td>usertype</td>
<td>action</td>
";
foreach($query->result() as $row) :
echo "<tr><td>";
echo anchor('member/index/'.$row->userid,$row->userid);
echo "</td><td>";
echo $row->username;
echo "</td><td>";
echo $row->password;
echo "</td><td>";
echo $row->usertype;
echo "</td><td>";
echo anchor('member/del/'.$row->userid,'删除');
echo "</td></tr>";
endforeach;
?>
</table>
</body>
</html>